<div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>商品信息</h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-white" v-on:click="_closeAddProduct()">返回</button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="form-group row">
                        <label class="col-sm-1 col-form-label text-right">商品名称</label>
                        <div class="col-sm-5">
                            <input v-model="addChainProductInfo.prodName" type="text" placeholder="必填，请填写商品名称" class="form-control">
                        </div>
                        <label class="col-sm-1 col-form-label text-right">商品分组</label>
                        <div class="col-sm-5">
                            <select class="custom-select" v-model="addChainProductInfo.catalogId">
                                <option selected disabled value="">必填，请选择商品分组</option>
                                <option v-for="(item,index) in addChainProductInfo.catalogs"
                                        :value="item.catalogId">{{item.catalogName}}
                                </option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-1 col-form-label text-right">单位</label>
                        <div class="col-sm-5">
                            <input v-model="addChainProductInfo.unitName" type="text" placeholder="选填，请填写单位" class="form-control">
                        </div>
                        <label class="col-sm-1 col-form-label text-right">排序</label>
                        <div class="col-sm-5">
                            <input v-model="addChainProductInfo.sort" type="text" placeholder="选填，请填写排序" class="form-control">
                        </div>
                    </div>
                    
                    <div class="form-group row">
                        <label class="col-sm-1 col-form-label text-right">商品简介</label>
                        <div class="col-sm-11">
                            <textarea v-model="addChainProductInfo.prodDesc" placeholder="必填，请填写商品简介" maxlength="250" class="form-control"></textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>商品图片</h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="form-group row">
                        <label class="col-sm-1 col-form-label text-right">商品封面</label>
                        <div class="content-img col-sm-11">
                            <vc:create path="frame/uploadImage" callBackListener="addProduct" callBackFunction="notifyUploadCoverImage" namespace="addProductCover" imageCount="1">
                            </vc:create>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-1 col-form-label text-right">商品轮播</label>
                        <div class="content-img col-sm-11">
                            <vc:create path="frame/uploadImage" callBackListener="addProduct" callBackFunction="notifyUploadCarouselFigureImage" namespace="addProductCarouselFigure" imageCount="3">
                            </vc:create>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>商品规格</h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_addChainProductSpec()">
                            <i class="fa fa-plus"></i>添加
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                            <tr>
                                <th class="text-center">规格名称</th>
                                <th class="text-center">规格值</th>
                                <th class="text-center">价格</th>
                                <th class="text-center">条形码</th>
                                <th class="text-center">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="productSpec in addChainProductInfo.productSpecs">
                                <td class="text-center">
                                    <input class="form-control" v-model="productSpec.specName" type="text" /></td>
                                <td class="text-center">
                                    <input class="form-control" v-model="productSpec.specValue" type="text" />
                                </td>
                                <td class="text-center">
                                    <input class="form-control" v-model="productSpec.price" type="number" />
                                </td>
                                <td class="text-center">
                                    <input class="form-control" v-model="productSpec.barCode" type="text">
                                </td>
                                <td class="text-center">
                                    <div class="btn-group">
                                        <button class="btn-white btn btn-xs" v-on:click="_openAddDeleteProductSpec(productSpec)">删除
                                    </button>
                                    </div>
                                    <div class="btn-group" v-if="productSpec.isDefault != 'T'">
                                        <button class="btn-white btn btn-xs" v-on:click="_doAddDefaultProductSpec(addChainProductInfo,productSpec)">默认规格
                                    </button>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="10">
                                    <ul class="pagination float-right"></ul>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>商品扩展</h5>
                    <div class="ibox-tools" style="top:10px;">

                    </div>
                </div>
                <div class="ibox-content">
                    <div class="form-group row">
                        <label class="col-sm-1 col-form-label text-right">商品状态</label>
                        <div class="col-sm-11">
                            <select class="custom-select" v-model="addChainProductInfo.state">
                            <option selected disabled value="">选填，请选择状态</option>
                            <option value="1001">未上架</option>
                            <option value="2002">上架</option>
                        </select>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-1 col-form-label text-right">商品详情</label>
                        <div class="col-sm-11 ">
                            <div class=" no-padding">
                                <div class="summernote"></div>
                            </div>
                            <!--<textarea v-model="addNoticeViewInfo.context" cols="3"  type="text" placeholder="必填，请填写公告内容" class="form-control"></textarea>-->
                        </div>
                    </div>
                    <div class="ibox-content">
                        <button class="btn btn-primary float-right" type="button" v-on:click="saveProductInfo()"><i
                class="fa fa-check"></i>&nbsp;保存</button>
                        <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" v-on:click="_closeAddProduct()">取消</button>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>